# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Sarboni <max-k@post.com>

pkgname=python-pydispatcher
pkgver=2.0.7
pkgrel=1
pkgdesc="Multi-Producer Multi-Consumer Observer Pattern for Python"
url="https://github.com/mcfletch/pydispatcher"
arch=('any')
license=('BSD')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("https://pypi.io/packages/source/P/PyDispatcher/PyDispatcher-$pkgver.tar.gz")
sha512sums=('cef4b07e7abcbef54b3af12b49a27e40d145f76d5aa51dfcedc38d76d51c4076c605c0b55e05881dc26ac260a583f119864fa4b4e8ab21d156231b07ef418916')

build() {
  cd PyDispatcher-$pkgver
  python -m build -nw
}

check() {
  cd PyDispatcher-$pkgver
  python -m unittest discover
}

package() {
  cd PyDispatcher-$pkgver
  python -m installer -d "$pkgdir" dist/*.whl
  install -Dm644 license.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
